package com.hulk.dryad.web.api.vo.base;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author hulk
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ToString(callSuper = true)
public  class ReqVO extends BaseVO {

	private static final long serialVersionUID = 1L;


	@NotBlank(message="请求时间不可为空;")
	@Length(min=14,max=14,message="请求时间长度不正确,长度为14位;")
	@Pattern(regexp = "^[0-9]+$" ,message="请求时间格式不正确;")
	@ApiModelProperty(value = "请求时间",required = true)
	private String reqTime;

	@ApiModelProperty(value = "签名字段", required = true)
    private String signature;
	// C端APP或者小程序请求 此处填写uuid 做到 无条件唯一。因为此字段用来防止重放攻击
//	@NotBlank(message="重放攻击key不能为空;")
//	@ApiModelProperty(value = "重放攻击key",required = true)
//	private String  nonce;
//
//	public static final String NONCE = "nonce";
}